unit uMessage;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, cxGraphics, cxControls, cxLookAndFeels,
  cxLookAndFeelPainters, cxContainer, cxEdit, Vcl.Menus, Vcl.StdCtrls,
  cxButtons, cxLabel, cxImage, dxGDIPlusClasses, dxSkinsCore,
  dxSkinOffice2010Blue;

type
  TFrmMessage = class(TForm)
    BtnOk: TcxButton;
    cxMsg: TLabel;
    btnSim: TcxButton;
    btnNao: TcxButton;
    cxImage1: TcxImage;
    procedure BtnOkClick(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure btnNaoClick(Sender: TObject);
    procedure btnSimClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FrmMessage: TFrmMessage;

implementation

{$R *.dfm}

procedure TFrmMessage.btnNaoClick(Sender: TObject);
begin
   btnSim.Tag := 0;
   Close;
end;

procedure TFrmMessage.BtnOkClick(Sender: TObject);
begin
   BtnOk.tag := 1;
   Close;
end;

procedure TFrmMessage.btnSimClick(Sender: TObject);
begin
   btnSim.tag := 1;
   Close;
end;

procedure TFrmMessage.FormShow(Sender: TObject);
begin
   if btnNao.Visible = true then
      btnNao.SetFOcus else
      btnOk.SetFocus;
end;

end.
